<?php

namespace App\model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\model\CoustomerDemand
 *
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\CoustomerDemand newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\CoustomerDemand newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\CoustomerDemand query()
 * @mixin \Eloquent
 * @property int $id
 * @property string|null $name
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\CoustomerDemand whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\CoustomerDemand whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\CoustomerDemand whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\CoustomerDemand whereUpdatedAt($value)
 */
class CoustomerDemand extends Model
{
    protected  $table='customer_demand';

    public static function getSelectOptions()
{
    $options = \DB::table('customer_demand')->select('id','name as text')->get();
    $selectOption = [];
    foreach ($options as $option){
        $selectOption[$option->id] = $option->text;
    }
    return $selectOption;
}

}
